package com.litong.rms.service.impl;

import java.util.List;

import com.litong.rms.bean.User;
import com.litong.rms.dao.UserDao;
import com.litong.rms.service.UserService;

public class UserServiceImpl implements UserService {
	private UserDao userDao;
	public void addUser(User u) {
		System.out.println("user has been saved!");
		userDao.addUser(u);
		
	}
	
	public User findUser(User u) {
		return userDao.findUser(u);
	}
	public void updateUser(User u){
		userDao.updateUser(u);
	}
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}
	public UserDao getUserDao() {
		return userDao;
	}

	public void deleteUser(User u) {
		userDao.deleteUser(u);
		
	}

	@SuppressWarnings("unchecked")
	public List<User> getUserList() {
		return userDao.getUserList();
	}

	public User findById(int id) {
		
		return userDao.findById(id);
	}
	

}
